import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/components/index'
import detail from '@/components/detail'
Vue.use(Router)

export default new Router({
  mode:'history',
  routes: [
    {
      path: '/',
      name: 'Index',
      component: Index,
      meta: {
        keepAlive: true, //此组件需要被缓存

      }
    },
    {
      path: '/detail',
      name: 'detail',
      component: detail,
      meta: {
        keepAlive: false, //此组件需要不被缓存

      }
    }
  ]
})
